package com.topboya.officeuser.utils;

import com.topboya.officeuser.entity.Office;
import com.topboya.officeuser.exception.OfficeUserException;

/**
 * @className IfOffice
 * @Author xiaxin
 * @Date 2020/8/8 20:24
 * @Version 1.0
 **/
public class IfOffice {

    public static Boolean ifOffice(Office office){
        if(office.getType().length()>1){

            throw new OfficeUserException("type字段位数为1，请输入1位的字段");

        }

        if(office.getDelFlag().length()>1){
            throw new OfficeUserException("delFlag字段位数为1，请输入1位字段长度");
        }
     return true;
    }
}
